package com.fang.utils;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

/**
 * @author fanglingxiao
 * @version 1.0
 * @description TODO
 * @date 2022/4/5 5:07 下午
 **/
public class JdbcUtils {

    public static Class<?> registerDriver() throws ClassNotFoundException {
        return Class.forName("com.mysql.cj.jdbc.Driver");
    }

    public static Connection buildConn(String url, String userName, String password) throws SQLException {
        return DriverManager.getConnection(url, userName, password);
    }
}
